package com.Ticker;
//买同一张票，故三个线程共享同一个数据
public class Demo {
    public static void main(String[] args) {
//   创建线程类
        tickerThreads tickerThreads = new tickerThreads();
//        创建三个线程
        Thread thread1 = new Thread(tickerThreads);
        Thread thread2 = new Thread(tickerThreads);
        Thread thread3 = new Thread(tickerThreads);
        thread1.setName("小红");
        thread2.setName("李四");
        thread3.setName("杰克");
//        开启线程
        thread1.start();
        thread2.start();
        thread3.start();
    }
}
